{% extends 'commonTmp.html' %}
{% block main %}


<!--====================================================================
   Start Cart Page
=====================================================================-->
<section class="cart-page mt-120 rmt-80 mb-120 rmb-80">
    <div class="container">
        <div class="row col-gap-60">
            <div class="col-xl-12">
                <div class="cart-total-product rmb-80 b1 br-5 p-50">
                    <h4 class="cart-heading">购物车清单</h4>
                    <div class="cart-title d-none d-md-flex">
                        <h5 class="product-title">商品名称</h5>
                        <h5 class="quantity-title">购买数量</h5>
                        <h5 class="price-title">单价</h5>
                        <h5 class="total-title">小计</h5>
                    </div>
                    <div class="cart-items pb-15">
                        {% for item in cart_goods_lists %}
                        <div class="cart-single-item">

                            <div class="product-img">
                                <img src="{%static 'assets/img/goods/' %}{{item.0.goods_img}} " alt="Product Image">
                            </div>
                            <h6 class="product-name">{{item.0.goods_name}}</h6>
                            <div class="number-input">

                                <input class="quantity" min="1" name="quantity" value="{{item.num}}" type="number"
                                       readonly="readonly">
                            </div>
                            <h6 class="product-price">{{item.0.goods_price}}</h6>
                            <h6 class="product-total-price">{% widthratio item.num 1  item.0.goods_price%}</h6>
                        </div>
                        {% endfor %}
                    </div>
                    <form id="contact-form" name="contact_form" class="contact-form" action="{% url 'order_submit' %}"
                          method="POST">
                        <div class="row clearfix">
                            <div class="col-md-4">
                                <input type="text" name="cart_goods_lists" hidden>
                                <div class="form-group">
                                    <label for="name">收货人姓名</label>
                                    <input type="text" name="order_recv" id="name" class="form-control" value="{{info.0.order_recv}}"
                                             disabled>
                                </div>
                            </div>
                            <div class="col-md-4">
                                <div class="form-group">
                                    <label for="address">收货地址</label>
                                    <input type="text" name="order_addr" id="address" class="form-control" value="{{info.0.order_addr}}"
                                            disabled>
                                </div>
                            </div>
                            <div class="col-md-4">
                                <div class="form-group">
                                    <label for="phone">联系电话</label>
                                    <input type="text" name="order_tele" id="phone" class="form-control"
                                            value="{{info.0.order_tele}}" disabled>
                                </div>
                            </div>

                            <div class="col-md-12">
                                <div class="form-group">
                                    <label for="message">备注</label>
                                    <textarea name="order_extra" id="message" class="form-control" rows="1"
                                            placeholder="{{info.0.order_extra}}"   disabled></textarea>
                                </div>
                            </div>
                        </div>
                        <div class="col-xl-12">
                            <div class="cart-total-price p-50">
                                <h4 class="cart-heading">订单详情</h4>
                                <div class="total-item-wrap">
                                    <div class="total-item sub-total">
                                        <span class="title">商品总数 {{total_nums}} 件</span>
                                        <span class="price">{{before_discount}}</span>
                                    </div>
                                    <div class="total-item shipping">
                                        <span class="title">运费</span>
                                        <span class="price">{{order_fee}}</span>
                                    </div>

                                    <div class="total-item discount">
                                        <span class="title">折扣</span>
                                        <span class="price">{{discount}}</span>
                                    </div>
                                    <div class="total-item total">
                                        <span class="title mb-0">应付金额</span>
                                        <span class="price mb-0">{{total_money}}</span>
                                    </div>
                                </div>
                                <div class="proceed-btn mt-30">
                                    <button class="theme-btn w-100 text-center br-10" type="submit" disabled>已付款</button>
                                </div>
                            </div>
                        </div>
                    </form>

                </div>
            </div>

        </div>

    </div>
</section>
<!--====================================================================
   End Cart Page
=====================================================================-->


{% endblock %}